package com.wanxi.spring.cloud.team.feign;

import com.wanxi.spring.cloud.team.feign.impl.UserFallbackService;
import com.wanxi.spring.cloud.team.model.User;
import com.wanxi.spring.cloud.team.model.UserRole;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "user",fallback = UserFallbackService.class)
public interface UserService {

    @GetMapping("/user/selectUserById")
    User selectUserById(@RequestParam("id") int id);

    @GetMapping("/user/getUserByName")
    User getUserByName(@RequestParam("code") String code);

    @GetMapping("/user/updateUserRole")
    int updateUserRole(@RequestBody UserRole userRole);
}
